<?php

namespace App\Policies;

use Illuminate\Auth\Access\HandlesAuthorization;
use App\User;

class UserPolicy
{
    use HandlesAuthorization;

    /**
     * Create a new policy instance.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    /**
     * Can not delete him self.
     *
     * @return void
     */
    public function destroy(User $user, User $record){
        if ($user->id === $record->id) {
            return false;
        }
        return true;
    }
}
